home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Utilities / Print / Printer Drivers / Daisy Printer Driver / daisy.note < prev    next >
Encoding:
Internet Message Format  |  1988-03-22  |  7.7 KB  |  [TEXT/EDIT]

  1. From: Earle R. Horton
  2. Subject: Daisy v1.1
  3. Date: 7 Mar 88 23:53:50 GMT
  4. Organization: Dartmouth College, Hanover, NH
  5.  
  6. This the documentation for Daisy v1.1, a User/Chooser configurable printer
  7. driver for the Mac and man daisy wheel and dot-matrix printers.  The printer
  8. driver is designed to be obvious to use, and most users will hopefully have
  9. no problems with it.  This file covers some of the subtle points of operation,
  10. which some users will not find obvious.  If you decide to distribute Daisy,
  11. (which you have my permission to do) please include this file.
  12.  
  13. This is version 1.1 of Daisy, the User/Chooser configurable printer
  14. driver for Daisy wheel and Dot matrix serial printers. 
  15.  
  16. This is basically the same printer driver documented in the November and
  17. December, 1987 issues of MacTutor Magazine, with the following
  18. additions:
  19.  
  20.     a)  Converted to MPW C.
  21.     b)  Memory management routines extensively optimized by hand
  22.         before compiling.  Storage requirements trimmed.
  23.     c)  Error checking improved.  The driver open routine checks
  24.         for Resource Manager, Memory Manager, and Serial Driver
  25.         errors, and returns the appropriate error code to PrOpen().
  26.     d)  Print dialog code overhauled.  E.g. the "sideways" item
  27.         in the Job Dialog actually works, and is saved in the
  28.         current Print Record.
  29.     e)  If possible, uses the PrGlue trap instead of referencing low
  30.         memory globals when accessing the printer driver's
  31.         device control entry and when setting the error code for 
  32.         the print abort condition.  If the PrGlue trap is not
  33.         present, then the old method is used.
  34.     f)  Compiled and tested on a Mac II, compatible with the
  35.         following:
  36.           i)   MultiFinder.
  37.           ii)  Machines from 512KE, System 2.0, to Mac II, system 4.2.
  38.           iii) 64 ROMs, I think so.  (Let me know, please?)
  39.           iv)  Many, many, many applications and printers.
  40.     g)  Low-level printer calls now do the correct things in
  41.         almost all cases.  Applications which use them should
  42.         produce correct results.
  43.     h)  Strings are stored in resources so that the driver can
  44.         be localized as necessary.
  45.  
  46. Daisy requires Chooser 3.0 or newer (or a resource editor) to configure
  47. it properly.  Before using Daisy for the first time, you should select
  48. the Daisy icon in the Chooser box, then press the "Setup..." button
  49. which appears.  A dialog box will then appear which will allow you to
  50. set the baud rate, flow control, and several printer control strings. 
  51. "Top of Page" and "Left Margin" are meant for the low-level routines. 
  52. "Top of Page" should advance the paper to the point where you desire
  53. printing to start on the page.  "Left Margin" should contain enough
  54. spaces or tabs to provide the correct left margin.  A "Line Terminator"
  55. string is required; you should obtain the correct string to use from
  56. your printer manual since not all printers use the same string.  A caret
  57. ('^') in front of a character means use the control character.  Example:
  58. Most printers will use CR-LF for "Line Terminator".  If this is the case
  59. with your printer, enter "^M^L" for this parameter.  The default
  60. settings in this version of Daisy are correct for a Tandy DMP-110
  61. connected to the modem port at 1200 baud, using CTS flow control. 
  62.  
  63. The driver reads in the information set in the Chooser configuration box
  64. once, at open time.  For this reason, you are not usually able to
  65. reconfigure Daisy from within a running application.  Recommended
  66. procedure for changing Daisy's parameters is to configure Daisy, using
  67. the Chooser, when in the Finder.  The next time you run an application
  68. which prints with Daisy, the new settings will be used. 
  69.  
  70. IF YOU USE DAISY WITH THE PRINTER PORT, IT IS UP TO YOU TO MAKE SURE
  71. APPLETALK IS OFF.  You can do this within the Chooser, if you have
  72. version 3.0 or newer.  Daisy will just quit if AppleTalk is on and its
  73. settings say to use the printer port.  Depending on what kind of
  74. error-checking is done by your application, you may get some kind of
  75. error message.
  76.  
  77. If you have an older System, which Chooser 3.0 will not run with, or if
  78. you simply do not have the Chooser 3.0 desk accessory, then it is very
  79. simple to configure Daisy using ResEdit or REdit. 
  80.  
  81. The printer control strings are in 'STR#' -4080.  They are, by
  82. number:
  83.     1)  Line Terminator.
  84.     2)  Initialize printer
  85.     3)  Top of paper (low-level routines only).
  86.     4)  End of page (usually "^L").
  87.     5)  Left margin (low-level routines only).
  88.         (A bunch of spaces is good here. )
  89.  
  90. The information for the serial port is in 'HEXA' -8192.  ResEdit and
  91. REdit will edit this type resource as hex data.  Daisy interprets it as
  92. three integers.  An integer takes up four characters of hex data.  None
  93. of these integers exceeds 000A.  Invalid values will produce undefined
  94. results, since Daisy is naive and expects the 'HEXA' resource to contain
  95. only valid data.
  96.  
  97. data 'HEXA' (-8192, "Printer Settings") {
  98.     $"0000 0002 0000 "
  99. };
  100.                     ^ third integer
  101.                ^second integer
  102.           ^first integer
  103.  
  104. The first integer tells Daisy what port to use.  Allowable values 
  105. are 0000 for the modem port, and 0001 for the printer port.  Make
  106. sure you turn off AppleTalk if you use the printer port.
  107.  
  108. The second integer determines the baud rate:
  109.  
  110.     0000       300
  111.     0001       600
  112.     0002      1200
  113.     0003      1800
  114.     0004      2400
  115.     0005      3600
  116.     0006       4800
  117.     0007      7200
  118.     0008      9600
  119.     0009     19200
  120.     000A     57600
  121.     
  122. The third integer specifies which type of flow control to use.  Use 0000
  123. for CTS, 0001 for Xon/Xoff.  Refer to your printer manual to determine
  124. which is appropriate.  If either can be used, then best results are
  125. usually obtained with Xon/Xoff. 
  126.  
  127. Recommended font/style:  Monaco 9, plain, 11 pixels per line.
  128.  
  129. Custom 'PREC's (hackers only): Go ahead, enjoy yourself.  Daisy will
  130. reject any 'PREC' it cannot handle.  Attempts to produce more than 66
  131. lines per page are doomed to failure, since that is all I allocate for
  132. storage.  The maximum number of columns is 164. 
  133.  
  134. Other uses: Daisy can be used to "print" from your word processor to and
  135. serial device, like maybe a modem or mainframe terminal connection.
  136. Draft copies of documents could be uploaded to a mainframe or other
  137. microcomputer, for possible use or even printing by the host computer.
  138.  
  139. Support: This is FREEWARE.  I do not support it.  LightSpeedC sources
  140. are available from MacTutor Magazine on the December, 1987 source disk. 
  141. Full instructions are provided in the November and December issues for
  142. 1987.  Building Daisy with LightSpeedC is a royal pain, but it can be
  143. done.  The current (MPW) sources are available from me for $20.00
  144. American to cover handling.  I have made no attempt to maintain
  145. compatibility between the LightSpeedC sources and the MPW sources, no
  146. attempt at all.  I will not distribute copies of the LightSpeedC
  147. sources, since I do not feel that would be fair to MacTutor, neither
  148. will I supply copies of the article on disk.  (MacTutor supplies back
  149. issues through mail order at a fair price.) The MPW sources come with
  150. all source files necessary to build Daisy, including a Makefile.  I do
  151. not send them out by E-Mail.  For $35.00, I will send you an MPW source
  152. disk via U.S. Post Office overnight mail.  Bear with me, people ask
  153. these kinds of things.  I will answer questions about Daisy on the
  154. phone, but the amount of time I will give you depends on how interesting
  155. you are to talk to.  I do not have the time to supply customized
  156. versions of Daisy, but there are lots and lots of hungry high school
  157. kids around who can program in C, or would be willing to try for a few
  158. bucks, an occasional loan of your car, or a chance to play games on your
  159. Mac or with your daughter. 
  160.  
  161. *********************************************************************
  162. *Earle R. Horton, H.B. 8000, Dartmouth College, Hanover, NH 03755   *
  163. *********************************************************************
  164.